{extend name='table'}


{block name="content"}
<div class="layui-tab layui-tab-card">

    <ul class="layui-tab-title">
        {foreach $task_arr as $k=>$v}{if isset($task_id) and $task_id eq $k}
        <li  data-mytest="{:url('index')}?task_id={$k}&class_id={$class_id}" class="layui-this">{$v}</li>
        {else}
        <li data-mytest="{:url('index')}?task_id={$k}&class_id={$class_id}">{$v}</li>
        {/if}{/foreach}
    </ul>
    <div class="layui-tab-content">

        <table id="GoldTable" data-url="{:sysuri('index')}" data-target-search="form.form-search"></table>
    </div>
</div>
<script>


    $(function () {
        $('#GoldTable').layTable({
            even: true, height: 'full',
            where:{'class_id':{$class_id},'task_id':{$task_id} },
            cols: [[
                {field: 'user_name', title: '{:lang("名字")}', minWidth: 100, align: 'center'},
                {field: 'total_gold', title: '{:lang("分数")}', minWidth: 100, align: 'center'},
                {toolbar: '#goldtool', title: '{:lang("操作面板")}', align: 'center', minWidth: 250, fixed: 'right'}
            ]]
        });


    });
</script>

<script type="text/html" id="goldtool">

    <!--{if auth("edit")}-->
    <a class="layui-btn layui-btn-sm"   data-title="{:lang('详情')}" data-area="['950px', '850px']" data-modal='{:url("info")}?index_user_id={{d.index_user_id}}&task_id={$task_id}'>{:lang('详情')}</a>
    <!--{/if}-->

</script>
{/block}
